FROM node:20-alpine

ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime    && echo $TZ > /etc/timezone

RUN echo "https://mirrors.aliyun.com/alpine/latest-stable/main" > /etc/apk/repositories && echo "https://mirrors.aliyun.com/alpine/latest-stable/community" >> /etc/apk/repositories

RUN apk --update add git

RUN mkdir -p /data

WORKDIR /data

COPY . /data

RUN npm config set registry https://registry.npmmirror.com/  && npm install

CMD npm run start